<template>
  <!-- 送货信息 -->
  <div id="deliverDetail">
    <el-form :model="form" label-width="100">
      <!-- <el-form-item label="合同名称:">
        <p @click="toContractDetail" class="click">{{ form.contractName }}</p>
      </el-form-item> -->
      <!-- <el-form-item label="客户:">
        <p @click="toCustomerDetail" class="click">{{ form.customerName }}</p>
      </el-form-item> -->
      <el-form-item label="发货方式:">
        <p>{{ form.deliverWayName }}</p>
      </el-form-item>
      <el-form-item label="司机:" v-if="form.deliverType == 1">
        <p>{{ form.driverName }}</p>
      </el-form-item>
      <el-form-item label="车牌号:" v-if="form.deliverType == 1">
        <p>{{ form.carNumber }}</p>
      </el-form-item>
      <el-form-item label="单号:" v-if="form.deliverType != 1">
        <p>{{ form.orderNumber }}</p>
      </el-form-item>
      <el-form-item label="配送人:">
        <p>{{ form.deliveryName }}</p>
      </el-form-item>
      <el-form-item label="配送时间:">
        <p>{{ form.deliverTime }}</p>
      </el-form-item>
      <el-form-item label="送货状态:">
        <p>{{ form.typeName }}</p>
      </el-form-item>
      <el-form-item label="收货地址:">
        <p>{{ form.address }}</p>
      </el-form-item>
      <el-form-item label="备注:">
        <p>{{ form.remark }}</p>
      </el-form-item>
      <el-form-item label="附件:" style="width: 100%">
        <other-files ref="otherFiles" :files="form.otherFileList"></other-files>
      </el-form-item>
      <!-- <el-form-item label="审核状态:" v-if="isReloadData" style="width: 100%">
        <p v-if="form.status == 0" style="color: #e6a23c">待审核</p>
        <p v-if="form.status == 1" style="color: #67c23a">通过</p>
        <p v-if="form.status == 2" style="color: #f56c6c">未通过</p>
      </el-form-item> -->
      <el-form-item label="创建时间:">
        <p>{{ form.createTime }}</p>
      </el-form-item>
      <el-form-item label="修改时间:" v-if="form.updateTime">
        <p>{{ form.updateTime }}</p>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
import otherFiles from '@/components/otherFiles'
export default {
  name: 'deliverDetail',
  data () {
    return {
      // form: {},
      isReloadData: true//局部刷新标识
    }
  },
  components: {
    otherFiles,
  },
  props: {
    form: {
      type: Object,
      required: true,
      default: () => {
        return {}
      }
    }
  },
  methods: {
    toCustomerDetail () {
      this.$router.push({
        path: '/customer/customerManagement/customerDetail',
        query: {
          id: this.form.customerId
        }
      })
    },
    toContractDetail () {
      this.$router.push({
        path: '/contract/contractManagement/contractDetail',
        query: {
          id: this.form.contractId
        }
      })
    },

  }
}
</script>
<style lang='scss' scoped>
</style>